<a href="javascript: history.go(-1)"><strong>&lt;&lt; REGRESAR</strong></a>

<!-- BEGIN Success-->
<?php echo $this->partial('partials/success.phtml', 'default', array('success' => $this->success)); ?>
<!-- END Success -->
<!-- BEGIN Success-->
<?php echo $this->partial('partials/error.phtml', 'default', array('errors' => $this->errors)); ?>
<!-- END Success -->


<?php if (isset($this->post)) { ?>

<a name="<?php echo $this->post['aliast']; ?>"></a>
<h2><a href="/articulo/index/alias/<?php echo $this->post['aliast']; ?>/" title="<?php echo $this->post['title']; ?>"><?php echo $this->post['title']; ?></a></h2>

<p class="post-info">Editado por <strong><?php echo $this->post['username']; ?></strong> | Categoría:  <a href="/categorias/categoria/id/<?php echo $this->post['categoryid']; ?>"><?php echo $this->post['categoryname']; ?></a></p>

<p><?php echo $this->post['content']; ?></p>

<p class="post-footer">
    <span class="comments">( <?php if(isset($this->comments)) echo count($this->comments); else echo 0; ?> ) </span> |
    <span class="date"><?php echo date('j-M-Y', strtotime($this->post['lastchange'])); ?></span>

</p>




<h3 id="comments"><?php if(isset($this->comments)) echo count($this->comments); else echo 0; ?> Comentarios</h3>

<ol class="commentlist">

    <?php if (isset($this->comments)){
            $i = 0;
            foreach($this->comments as $comment){
                $alt = (($i % 2) == 0)? 'alt' : '';
    ?>


    <li class="<?php echo $alt; ?>" id="comment-63">
        <cite>
            <img alt="" src="<?php echo $this->showUserImage($comment['username']); ?>" class="avatar" height="40" width="40" />
            <a href="index.html"><?php echo $comment['username'] ?></a> Dice: <br />
            <span class="comment-data"><a href="#comment-63" title=""><?php echo date('j-M-Y H:i', strtotime($comment['date'])); ?></a> </span>

        </cite>

        <div class="comment-text">
            <p><?php echo $comment['comment']; ?></p>
        </div>

    </li>
            
   <?php   $i++; }
        
        }
   ?>

</ol>
<!-- BEGIN Success-->
<?php echo $this->partial('partials/error.phtml', 'default', array('errors' => $this->errors)); ?>
<!-- END Success -->

<!-- BEGIN Success-->
<?php echo $this->partial('partials/success.phtml', 'default', array('success' => $this->success)); ?>
<!-- END Success -->
<h3 id="respond">Deja tu comentario:</h3>

<?php echo $this->commentsForm; ?>

<?php }else{  ?>

<h2> Articulo no encontrado </h2>
<p> ... </p>

<?php } ?>